package com.galeno.topn;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 2021/7/2816:57
 */
public class MyGroupCompartor extends WritableComparator {
    public MyGroupCompartor() {
        super(MovieBean.class,true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        MovieBean k1 = (MovieBean) a;
        MovieBean k2 = (MovieBean) b;
        return k1.getMovie() - k2.getMovie();


    }
}
